﻿using FluentMigrator;
using FluentMigrator.Builders.Create.Table;

namespace Rubikev.Rockface.Database.Tables
{
   /// <summary>
   /// Creates the Route table
   /// </summary>
   [Migration(201106051913)]
   public class CreateRouteTable : CreateTableMigration
   {
      /// <summary>
      /// The name of the route table
      /// </summary>
      public override string TableName
      {
         get { return "Route"; }
      }

      /// <summary>
      /// Creates the Id and ClimbId columns
      /// </summary>
      /// <param name="table">The route table</param>
      protected override void CreateColumns(ICreateTableWithColumnOrSchemaSyntax table)
      {
         table
            .WithColumn("Id").AsInt32().PrimaryKey()
            .WithColumn("ClimbId").AsInt32();
      }
   }
}
